#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Project: spd-sxmcc
"""
@author: lyndon
@time Created on 2018/11/22 15:50
@desc
"""

from xpinyin import Pinyin


a = ['电梯服务：无电梯', '安全管理：单元门锁', '停车位：地上停车位', '公墓/殡仪馆：卧龙山公墓']
af = {}

# commpy = Pinyin()  # 实例化拼音模块的函数
# [af.setdefault(str(commpy.get_pinyin(str(i.split('：')[0]).decode('utf-8'))), i.split('：')[1]) for i in a]
[af.setdefault(i.split('：')[0], i.split('：')[1]) for i in a]

for i in af:
    print(i + " -> " + af[i])

print(af.get('aaa', ''))



lst = []

try:
    price = lst[0]
except Exception as e:
    price = '0'
try:
    rr_month = lst[1]
except Exception as e:
    rr_month = '0'
try:
    rr_year = lst[2]
except Exception as e:
    rr_year = '0'

print(price, rr_month, rr_year)






